package webshop.beans;

import database.entity.User;

public class UserBean extends User {
	private boolean logedIn;
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public UserBean() {
	}

	public UserBean(Integer userid) {
		super(userid);
	}

	public UserBean(Integer userid, String username, String password,
			String firstName, String lastName, String email) {
		super(userid, username, password, firstName, lastName, email);
	}
	
	
	//Register the user
	public String register(){
		//TODO: Registracija korisnika
		return "registration_successfull";
	}

	
	//Login methods for user class
	public void logIn() {
		setLogedIn(true);
	}
	public void logOut(){
		setLogedIn(false);
	}

	public void setLogedIn(boolean logedIn) {
		this.logedIn = logedIn;
	}

	public boolean isLogedIn() {
		return logedIn;
	}
	//end login methods for user class
	
	
	
}
